/* jshint indent: 1 */

module.exports = function (sequelize, DataTypes) {
	return sequelize.define('sys_area', {
		id: {
			type: DataTypes.INTEGER(32),
			allowNull: false,
			primaryKey: true,
			autoIncrement: true
		},
		full_name: {
			type: DataTypes.STRING(255),
			allowNull: false
		},
		name: {
			type: DataTypes.STRING(100),
			allowNull: false
		},
		parent_ids: {
			type: DataTypes.STRING(255),
			allowNull: false
		},
		parent_id: {
			type: DataTypes.STRING(32),
			allowNull: true
		},
		level: {
			type: DataTypes.STRING(2),
			allowNull: true
		},
		area_code: {
			type: DataTypes.STRING(30),
			allowNull: true
		},
		area_type: {
			type: DataTypes.INTEGER(4),
			allowNull: true
		},
		sort: {
			type: DataTypes.INTEGER(4),
			allowNull: true
		},
		remarks: {
			type: DataTypes.STRING(500),
			allowNull: true
		}
	}, {
		tableName: 'sys_area',
		timestamps: false,
		freezeTableName: true
	});
};